﻿<common:LayoutAwarePage
    x:Class="Looptribe.Moodlin8.View.HubPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Looptribe.Moodlin8.View"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:common="using:Looptribe.Moodlin8.Common"
    xmlns:uiHelper="using:Looptribe.Moodlin8.UIHelper"
    xmlns:lt="using:Looptribe.WinRT.Toolkit.Controls"
    DataContext="{Binding Hub, Source={StaticResource Locator}}"
    mc:Ignorable="d">

    <Page.Resources>
        <!-- TODO: remove useless converter -->
        <!--<uiHelper:CourseNameConverter x:Key="CourseTitleBinder" />
        <uiHelper:MonthTitleConverter x:Key="MonthTitleBinder" />-->

        <Thickness x:Key="SectionMargin">30,0,30,10</Thickness>
        <Thickness x:Key="SectionMarginSnapped">5,0,2,10</Thickness>

        <!--VideSources-->
        <CollectionViewSource x:Name="monthesViewSource"/>

        <!--<Style x:Key="MoodleHubGroupHeaderTextStyle" TargetType="TextBlock">
            <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
            <Setter Property="TextTrimming" Value="WordEllipsis"/>
            <Setter Property="TextWrapping" Value="NoWrap"/>
            <Setter Property="Typography.StylisticSet20" Value="True"/>
            <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>
            <Setter Property="Typography.CaseSensitiveForms" Value="True"/>
            <Setter Property="FontSize" Value="26.667"/>
            <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
            <Setter Property="FontWeight" Value="Normal"/>
            <Setter Property="LineHeight" Value="30"/>
            <Setter Property="RenderTransform">
                <Setter.Value>
                    <TranslateTransform X="-1" Y="6"/>
                </Setter.Value>
            </Setter>
            <Setter Property="Foreground" Value="{StaticResource MoodleSectionTitleColor}"></Setter>
            <Setter Property="Margin" Value="5,0,0,0" />
        </Style>

        <Style x:Key="MoodleHubGroupHeaderTextStyleSnapped" TargetType="TextBlock">
            <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
            <Setter Property="TextTrimming" Value="WordEllipsis"/>
            <Setter Property="TextWrapping" Value="NoWrap"/>
            <Setter Property="Typography.StylisticSet20" Value="True"/>
            <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>
            <Setter Property="Typography.CaseSensitiveForms" Value="True"/>
            <Setter Property="FontSize" Value="16.667"/>
            <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
            <Setter Property="FontWeight" Value="Normal"/>
            <Setter Property="LineHeight" Value="17"/>
            <Setter Property="RenderTransform">
                <Setter.Value>
                    <TranslateTransform X="-1" Y="6"/>
                </Setter.Value>
            </Setter>
            <Setter Property="Foreground" Value="{StaticResource MoodleSectionTitleColor}"></Setter>
            <Setter Property="Margin" Value="5,0,0,0"></Setter>
        </Style>-->
        <Style x:Key="FileLinkTemplate" TargetType="Button">
            <Setter Property="Background" Value="{StaticResource ButtonBackgroundThemeBrush}"/>
            <Setter Property="Foreground" Value="{StaticResource ButtonForegroundThemeBrush}"/>
            <Setter Property="BorderBrush" Value="{StaticResource ButtonBorderThemeBrush}"/>
            <Setter Property="BorderThickness" Value="{StaticResource ButtonBorderThemeThickness}"/>
            <Setter Property="Padding" Value="12,4,12,4"/>
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Margin="2" Width="300" Height="40">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="40" Height="40">
                                <Image Stretch="UniformToFill">
                                    <Image.Source>
                                        <Binding Path="FileType" Converter="{StaticResource fileTypeConverter}" />
                                    </Image.Source>
                                </Image>
                            </Border>
                            <StackPanel Grid.Column="1" Margin="10,0,0,0">
                                <TextBlock Text="{Binding Name}" Style="{StaticResource ItemTextStyle}" TextWrapping="NoWrap" TextTrimming="None"/>
                            </StackPanel>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <DataTemplate x:Key="EnrolledCoursesTemplateBiggest">
            <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="300" Height="140" VerticalAlignment="Top">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"></RowDefinition>
                    <RowDefinition Height="10"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="Wrap" Foreground="White" VerticalAlignment="Bottom" Margin="5,0,5,5"/>
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="EnrolledCoursesTemplateBigger">
            <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="150" Height="140">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"></RowDefinition>
                    <RowDefinition Height="10"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="Wrap" Foreground="White" VerticalAlignment="Bottom" Margin="5,0,5,5"/>
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="EnrolledCoursesTemplateNormal">
            <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="150" Height="70">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"></RowDefinition>
                    <RowDefinition Height="10"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="Wrap" Foreground="White" VerticalAlignment="Bottom" Margin="5,0,5,5"/>
            </Grid>
        </DataTemplate>

        <uiHelper:CoursesGridTemplateSelector x:Key="CourseTemplateSelector" Biggest="{StaticResource EnrolledCoursesTemplateBiggest}" Bigger="{StaticResource EnrolledCoursesTemplateBigger}" Normal="{StaticResource EnrolledCoursesTemplateNormal}"/>

        <DataTemplate x:Key="NextAssignmentsTemplate">
            <Grid Height="70" Margin="2" Width="300">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal">
                    <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="70" Height="70">
                        <ContentControl Template="{StaticResource DateBlockTemplate}" />
                    </Border>
                    <Border BorderThickness="1" Width="230" Height="70" BorderBrush="#FFD3D3D3" Background="{StaticResource HubListItemBackground}">
                        <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0" Width="220" >
                            <!--<TextBlock Text="{Binding Id, Converter={StaticResource CourseTitleBinder}}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>-->
                            <TextBlock Text="{Binding Course}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>
                            <TextBlock Text="{Binding Title}" Style="{StaticResource SubtitleTextStyle}" TextWrapping="NoWrap"/>
                            <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
                        </StackPanel>
                    </Border>
                </StackPanel>
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="CorrectedAssignmentsTemplate">
            <Grid Height="70" Margin="2" Width="300">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal">
                    <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="70" Height="70">
                        <ContentControl Template="{StaticResource RatingBlockTemplate}" />
                    </Border>
                    <Border BorderThickness="2" Width="230" Height="70" BorderBrush="#FFD3D3D3" Background="{StaticResource HubListItemBackground}">
                        <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0" Width="220" >
                            <!--<TextBlock Text="{Binding Id, Converter={StaticResource CourseTitleBinder}}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>-->
                            <TextBlock Text="{Binding Course}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>
                            <TextBlock Text="{Binding Title}" Style="{StaticResource SubtitleTextStyle}" TextWrapping="NoWrap"/>
                            <TextBlock Text="{Binding Subtitle}" Style="{StaticResource BodyTextStyle}" MaxHeight="60"/>
                        </StackPanel>
                    </Border>
                </StackPanel>
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="MessagesTemplate">
            <Grid Height="70" Margin="2" Width="300">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal">
                    <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="70" Height="70">
                        <Image Source="{Binding Sender.Image}" Stretch="UniformToFill" AutomationProperties.Name="{Binding Sender.FirstName}"/>
                    </Border>
                    <Border BorderThickness="2" Width="230" Height="70" BorderBrush="#FFD3D3D3" Background="{StaticResource HubListItemBackground}">
                        <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding Sender.Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>
                            </StackPanel>
                            <TextBlock Text="{Binding Subject}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
                            <TextBlock Text="{Binding Body}" Style="{StaticResource BodyTextStyle}" MaxHeight="60" TextWrapping="NoWrap" TextTrimming="WordEllipsis"/>
                        </StackPanel>
                    </Border>
                </StackPanel>
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="UploadsTemplate">
            <Button Style="{StaticResource FileLinkTemplate}" Click="OpenUploadClick"></Button>
        </DataTemplate>
        <DataTemplate x:Key="CoursesTemplateSnapped">
            <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="300" Height="50" Margin="2">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"></RowDefinition>
                    <RowDefinition Height="10"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="Wrap" Foreground="White" VerticalAlignment="Bottom" Margin="10,0,5,5"/>
            </Grid>
        </DataTemplate>
        <Style x:Key="MonthButtonStyle" TargetType="Button">
            <Setter Property="MinWidth" Value="0"/>
            <Setter Property="MinHeight" Value="0"/>
            <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
            <Setter Property="Typography.StylisticSet20" Value="True"/>
            <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>
            <Setter Property="Typography.CaseSensitiveForms" Value="True"/>
            <Setter Property="FontSize" Value="26.667"/>
            <Setter Property="FontWeight" Value="Normal"/>
            <Setter Property="Foreground" Value="{StaticResource MoodleSectionTitleColor}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ButtonBase">
                        <Grid Background="Transparent">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="PointerOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MoodleSectionTitleColor}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPressedForegroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPressedForegroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity"/>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="CheckStates">
                                    <VisualState x:Name="Checked"/>
                                    <VisualState x:Name="Unchecked">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationSecondaryForegroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Indeterminate"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <ContentPresenter x:Name="Text" Content="{TemplateBinding Content}" />
                            <Rectangle
        						x:Name="FocusVisualWhite"
        						IsHitTestVisible="False"
        						Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
        						StrokeEndLineCap="Square"
        						StrokeDashArray="1,1"
        						Opacity="0"
        						StrokeDashOffset="1.5"/>
                            <Rectangle
        						x:Name="FocusVisualBlack"
        						IsHitTestVisible="False"
        						Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
        						StrokeEndLineCap="Square"
        						StrokeDashArray="1,1"
        						Opacity="0"
        						StrokeDashOffset="0.5"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <uiHelper:EventBackgroundConverter x:Key="EventBackgroundConverter" DefaultBrush="DarkGray">
            <uiHelper:EventBackgroundConverter.AssignmentBrush>
                <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                    <GradientStop Color="#48768d"/>
                    <GradientStop Color="#365265" Offset="1"/>
                </LinearGradientBrush>
            </uiHelper:EventBackgroundConverter.AssignmentBrush>
            <uiHelper:EventBackgroundConverter.CourseBrush>
                <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                    <GradientStop Color="#6e283a"/>
                    <GradientStop Color="#642834" Offset="1"/>
                </LinearGradientBrush>
            </uiHelper:EventBackgroundConverter.CourseBrush>
            <uiHelper:EventBackgroundConverter.UserBrush>
                <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
                    <GradientStop Color="#286e3a"/>
                    <GradientStop Color="#286434" Offset="1"/>
                </LinearGradientBrush>
            </uiHelper:EventBackgroundConverter.UserBrush>
        </uiHelper:EventBackgroundConverter>
        <DataTemplate x:Key="CalendarEvent">
            <Grid>
                <Border Background="{Binding Converter={StaticResource EventBackgroundConverter}}" Padding="4">
                    <TextBlock Text="{Binding Name}" Foreground="White" />
                </Border>
            </Grid>
        </DataTemplate>

        <Style x:Key="CalendarMonthsStyle" TargetType="ListBoxItem">
            <Setter Property="FontSize" Value="20" />
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Padding" Value="12"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBoxItem">
                        <Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="PointerOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="InnerGrid">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MoodleOrangeColor}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="White"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemDisabledForegroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PressedBackground"/>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemPressedForegroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="InnerGrid">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MoodleOrangeColor}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="SelectedUnfocused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="InnerGrid">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MoodleOrangeColor}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="SelectedDisabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="InnerGrid">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemSelectedDisabledBackgroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemSelectedDisabledForegroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="SelectedPointerOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="InnerGrid">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MoodleOrangeColor}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="SelectedPressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="InnerGrid">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemSelectedBackgroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemSelectedForegroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite"/>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused"/>
                                    <VisualState x:Name="PointerFocused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid x:Name="InnerGrid" Background="Transparent">
                                <Rectangle x:Name="PressedBackground" Fill="{StaticResource ListBoxItemPressedBackgroundThemeBrush}" Opacity="0"/>
                                <ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <Rectangle x:Name="FocusVisualWhite" Opacity="0" StrokeDashOffset=".5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1"/>
                                <Rectangle x:Name="FocusVisualBlack" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1"/>
                            </Grid>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Page.Resources>

    <Page.BottomAppBar>
        <AppBar x:Name="BottomAppBar1" Padding="10,0,10,0" AutomationProperties.Name="Bottom App Bar" Background="{StaticResource MoodleOrangeColor}" Foreground="White">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <!--<StackPanel x:Name="LeftPanel" Orientation="Horizontal" Grid.Column="0" HorizontalAlignment="Left">
                    <Button x:Name="Pin" Style="{StaticResource MoodlePinAppBarButtonStyle}" AutomationProperties.Name="{Binding PinButtonText}" Content="{Binding PinButtonIcon}" Tag="Pin to start" Command="{Binding PinToStartCommand}" />
                </StackPanel>-->
                <StackPanel x:Name="RightPanel" Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                    <Button x:Name="Refresh" Style="{StaticResource MoodleRefreshAppButtonStyle}" Tag="Refresh" Command="{Binding RefreshCommand}"/>
                    <Button x:Name="Logout" Style="{StaticResource MoodleLogoutAppButtonStyle}" Tag="Logout" Command="{Binding LogoutCommand}"/>
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.BottomAppBar>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid Style="{StaticResource LayoutRootStyle}">
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- Back button and page title -->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Click="GoBack" IsEnabled="False" Style="{StaticResource BackButtonStyle}"/>
            <StackPanel Orientation="Horizontal" Grid.Column="1" x:Name="TitleStackPanel">
                <TextBlock x:Name="pageTitle"  Text="{StaticResource AppName}" Style="{StaticResource MoodleAppTitleSyle}"/>
                <local:NavPopup Text="{Binding Info.Sitename}" />
            </StackPanel>
        </Grid>
        <ScrollViewer x:Name="outerScrollViewer" Grid.Row="1" Margin="0" Style="{StaticResource HorizontalScrollViewerStyle}" Loaded="ScrollViewer_Loaded">
            <ScrollViewer.Background>
                <ImageBrush ImageSource="ms-appx:///Assets/Background.png"/>
            </ScrollViewer.Background>
            <StackPanel x:Name="hubHorizontalPanel" Orientation="Horizontal" Margin="90,0,80,10" >
                <StackPanel x:Name="hubEnrolledCoursesPanel" Orientation="Vertical" Margin="{StaticResource SectionMargin}">
                    <!--<TextBlock x:Uid ="HubCoursesTitle" Text="Courses >" Style="{StaticResource MoodleHubGroupHeaderTextStyle}" x:Name="CoursesSectionTitle" />-->
                    <Button Content="Courses >" Style="{StaticResource MonthButtonStyle}" Command="{Binding GotoEnrolledCoursesCommand}" />
                    <ListView x:Name="hubEnrolledCourseListview" Margin="0,10,0,0" Width="300" Height="Auto" ItemsSource="{Binding Courses}" ItemTemplate="{StaticResource CoursesTemplateSnapped}" SelectionMode="None" IsSwipeEnabled="False" ItemClick="CourseGrid_ItemClick" Visibility="Collapsed" IsItemClickEnabled="True"/>

                    <uiHelper:CoursesGridView x:Name="hubEnrolledCourseGridview" Margin="0,20,0,0" Width="500" Height="600" ItemsSource="{Binding Courses}" ItemTemplateSelector="{StaticResource CourseTemplateSelector}" IsSwipeEnabled="false" IsItemClickEnabled="True" SelectionMode="None" ItemClick="CourseGrid_ItemClick">
                        <uiHelper:CoursesGridView.ItemsPanel>
                            <ItemsPanelTemplate>
                                <VariableSizedWrapGrid x:Name="CourseVariableGrid" ItemWidth="150"  ItemHeight="70" Orientation="Vertical" Margin="0,0,8,0" MaximumRowsOrColumns="6"/>
                            </ItemsPanelTemplate>
                        </uiHelper:CoursesGridView.ItemsPanel>
                    </uiHelper:CoursesGridView>
                </StackPanel>
                <StackPanel x:Name="hubNextAssignmentsPanel" Orientation="Vertical" Margin="{StaticResource SectionMargin}">
                    <Button Content="Next Assignments >" Style="{StaticResource MonthButtonStyle}" Command="{Binding GotoNextAssignmentsCommand}" />
                    <!--<TextBlock x:Uid="HubAssignmentsTitle" Text="Next Assignments >" Style="{StaticResource MoodleHubGroupHeaderTextStyle}" x:Name="NextAssignmentsSectionTitle" />-->
                    <ListView x:Name="hubNextAssignmentsListview" Margin="0,20,0,0" Width="330" Height="Auto" ItemsSource="{Binding Assignments}" ItemTemplate="{StaticResource NextAssignmentsTemplate}" SelectionMode="None" IsSwipeEnabled="False" IsItemClickEnabled="True" ItemClick="AssignmentItemClick"/>
                </StackPanel>
                <StackPanel x:Name="hubCorrectedAssignmentsPanel" Orientation="Vertical" Margin="{StaticResource SectionMargin}">
                    <Button Content="Corrected Assignments >" Style="{StaticResource MonthButtonStyle}" Command="{Binding GotoCorrectedAssignmentsCommand}" />
                    <!--<TextBlock x:Uid="HubCorrectedAssignmentsTitle" Text="Corrected Assignments >" Style="{StaticResource MoodleHubGroupHeaderTextStyle}"  x:Name="CorrectedAssignmentsSectionTitle"/>-->
                    <ListView x:Name="hubCorrectedAssignmentsListview" Margin="0,20,0,0" Width="330" Height="Auto" ItemsSource="{Binding CorrectedAssignments}" ItemTemplate="{StaticResource CorrectedAssignmentsTemplate}" SelectionMode="None" IsSwipeEnabled="False" IsItemClickEnabled="True" ItemClick="AssignmentItemClick"/>
                </StackPanel>
                <Grid x:Name="hubCalendarPanel" Margin="{StaticResource SectionMargin}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal" PointerPressed="MonthTitleClicked">
                        <Button Content="{Binding CurrentMonth}" Style="{StaticResource MonthButtonStyle}" Click="MonthTitleButtonClicked"></Button>
                        <Image Source="ms-appx:///Assets/Nav_arrow.png" Margin="7,10,0,0" ></Image>
                    </StackPanel>
                    <Popup IsLightDismissEnabled="True" Name="MonthPopup" VerticalOffset="50" >
                        <Popup.ChildTransitions>
                            <TransitionCollection>
                                <RepositionThemeTransition />
                            </TransitionCollection>
                        </Popup.ChildTransitions>
                        <Border BorderBrush="Black" BorderThickness="2">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0,0" StartPoint="1,1" >
                                    <GradientStop Color="#fdfdfd"/>
                                    <GradientStop Color="#d3d3d3" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.Background>
                            <ListBox ItemsSource="{Binding CalendarMonths}" Width="300" SelectionChanged="MonthSelectionChanges"
                                     BorderThickness="0" VerticalContentAlignment="Bottom" ItemContainerStyle="{StaticResource CalendarMonthsStyle}" />
                        </Border>
                    </Popup>
                    <lt:Calendar Grid.Row="1" Width="698" Margin="0,15,0,0"
                                 Height="500" VerticalAlignment="Top"
                                 CurrentDate="{Binding CurrentMonthDate}" Events="{Binding Events}"
                                 DayTapped="CalendarDayTapped"
                                 ItemTemplate="{StaticResource CalendarEvent}"/>
                </Grid>
                <StackPanel x:Name="hubUploadsPanel" Orientation="Vertical" Margin="{StaticResource SectionMargin}">
                    <!--<TextBlock x:Uid="HubUploadsTitle"  Text="Uploads >" Style="{StaticResource MoodleHubGroupHeaderTextStyle}" x:Name="UploadsSectionTitle"/>-->
                    <Button Content="Uploads >" Style="{StaticResource MonthButtonStyle}" Command="{Binding GotoUploadsCommand}" />
                    <ListView x:Name="hubUploadsListview" Margin="0,20,0,0" Width="330" Height="Auto" MaxHeight="500"  ItemsSource="{Binding Uploads}" ItemTemplate="{StaticResource UploadsTemplate}" SelectionMode="None" IsSwipeEnabled="False"/>
                </StackPanel>
                <StackPanel x:Name="hubMessagesPanel" Orientation="Vertical" Margin="{StaticResource SectionMargin}">
                    <!--<TextBlock x:Uid="HubMessagesTitle" Text="Messages >" Style="{StaticResource MoodleHubGroupHeaderTextStyle}" x:Name="MessagesSectionTitle"/>-->
                    <Button Content="Messages >" Style="{StaticResource MonthButtonStyle}" Command="{Binding GotoMessagesCommand}" />
                    <ListView x:Name="hubMessagesListview" Margin="0,20,0,0" Width="330" Height="Auto" ItemsSource="{Binding Messages}" ItemTemplate="{StaticResource MessagesTemplate}" ItemClick="MessagesItemClick" IsItemClickEnabled="True" SelectionMode="None" IsSwipeEnabled="False" />
                </StackPanel>
            </StackPanel>
        </ScrollViewer>

        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                <VisualState x:Name="FullScreenPortrait">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>

                <!-- The back button and title have different styles when snapped -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MoodleAppTitleSyleSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SchoolName" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource GroupHeaderTextStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(StackPanel.Orientation)" Storyboard.TargetName="TitleStackPanel">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Orientation>Vertical</Orientation>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(StackPanel.Orientation)" Storyboard.TargetName="hubHorizontalPanel">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Orientation>Vertical</Orientation>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ScrollViewer.VerticalScrollMode)" Storyboard.TargetName="outerScrollViewer">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <ScrollMode>Auto</ScrollMode>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style" Storyboard.TargetName="outerScrollViewer">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource VerticalScrollViewerStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="hubHorizontalPanel">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Thickness>5,0,5,5</Thickness>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="hubEnrolledCoursesPanel">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SectionMarginSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="hubNextAssignmentsPanel">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SectionMarginSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="hubCorrectedAssignmentsPanel">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SectionMarginSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="hubCalendarPanel">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Collapsed</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="hubUploadsPanel">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SectionMarginSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="hubMessagesPanel">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SectionMarginSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="hubNextAssignmentsListview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <x:Double>300</x:Double>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="hubEnrolledCourseGridview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <x:Double>300</x:Double>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="ItemTemplate" Storyboard.TargetName="hubEnrolledCourseGridview">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CoursesTemplateSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style" Storyboard.TargetName="CoursesSectionTitle">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MoodleHubGroupHeaderTextStyleSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style" Storyboard.TargetName="NextAssignmentsSectionTitle">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MoodleHubGroupHeaderTextStyleSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style" Storyboard.TargetName="CorrectedAssignmentsSectionTitle">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MoodleHubGroupHeaderTextStyleSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style" Storyboard.TargetName="UploadsSectionTitle">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MoodleHubGroupHeaderTextStyleSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style" Storyboard.TargetName="MessagesSectionTitle">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MoodleHubGroupHeaderTextStyleSnapped}"/>
                        </ObjectAnimationUsingKeyFrames>-->
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="hubCorrectedAssignmentsListview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <x:Double>300</x:Double>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="hubUploadsListview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <x:Double>300</x:Double>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="hubMessagesListview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <x:Double>300</x:Double>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="hubEnrolledCourseGridview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <x:Double>NaN</x:Double>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="hubEnrolledCourseListview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Visible</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="hubEnrolledCourseGridview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Collapsed</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="SchoolName">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Thickness>0,0,0,0</Thickness>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="hubNextAssignmentsListview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Thickness>0,10,0,0</Thickness>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="hubCorrectedAssignmentsListview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Thickness>0,10,0,0</Thickness>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="hubUploadsListview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Thickness>0,10,0,0</Thickness>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="hubMessagesListview">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Thickness>0,10,0,0</Thickness>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="backButton">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Thickness>15,0,0,0</Thickness>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</common:LayoutAwarePage>